package com.ming.demo.service.impl;

import com.ming.demo.bean.Result;
import com.ming.demo.mapper.FileMapper;
import com.ming.demo.model.File;
import com.ming.demo.service.FileFindImage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FileFindImageImpl implements FileFindImage {
    @Autowired
    private FileMapper fileMapper;

    @Override
    public Result<List<String>> listResult( String infoPeople_id ) {
        List<String> list = fileMapper.ListFindByName(infoPeople_id);
        Result result = new Result();
        result.setCode("200");
        result.setData(list);
        return result;
    }

    @Override
    public Result<List<File>> listFindByIsUrlImage(String name, String infoPeople_id) {
        List<File> list = fileMapper.findByNamesIsUrl(name, infoPeople_id);
        Result<List<File>> result = new Result();
        result.setCode("200");
        result.setData(list);
        return result;
    }
}
